package exception;

import java.io.FileNotFoundException;

/*
异常的抛出
 */
public class ThrowDemo {
    public static void main(String[] args) {
        Student zs=new Student();

        try{
            zs.setName("刘德华");
        } catch (IllegalAgeExceptiong  e){
            System.out.println("发生异常并处理--`了");
        }

            System.out.println("他的名字叫做"+zs.getName());


    }
}
